package com.bert.controller;

import com.bert.service.CallService;
import com.bert.service.TestService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/test")
@RestController
public class Test1Controller {

    @DubboReference
    private TestService testService;
    @DubboReference(timeout = 1200)
    private CallService callService;

    @GetMapping("/test")
    public String test() {
        return "OK";
    }

    @GetMapping("/one")
    public String getTest(String name) {
        return testService.getTest(name);
    }

    @GetMapping("/call")
    public String callTest(String name) {
        return callService.callTest(name);
//        return "";
    }


}
